/*
 * @Descripttion:
 * @Descripttion1:
 * @Descripttion2:
 * @version:
 * @Author: qguobin
 * @email: qguobin@linewell.com
 * @Date: 2023-10-26 09:46:27
 * @LastEditors: qguobin@linewell.com
 * @LastEditTime: 2024-01-08 19:25:17
 */
import {defineConfig, loadEnv } from 'vite'
import vue from '@vitejs/plugin-vue'

export default defineConfig(({command, mode}) => {
const env = loadEnv(mode, __dirname)
  return {
    base: "./",
    plugins: [vue()],
    server: {
      proxy: {
        [env.VITE_BASE_URL]: {
          target: env.VITE_BASE_API,
          changeOrigin: true,
          debugger: true,
        },
      },
    }
  }
})
